! 2d 0d

      end if
    end if
  else 
    if (b_nd == 0) then

! 2d 1d first
